import { useRef, useLayoutEffect } from 'react'

export default function TestHook () {
  const inputRef = useRef()

  useLayoutEffect(() => {
    console.log(inputRef.current)
    inputRef.current.focus()
  }, [])

  return (
    <div>
      TestHook
      <div>
        <input type='text' ref={inputRef} />
      </div>
    </div>
  )
}
